﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BLL;
using DAL;



namespace WellmeadowsHospital
{
    public partial class Form1 : DevExpress.XtraBars.Ribbon.RibbonForm
    {
        StaffBLL staffBLL = new StaffBLL();
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            HospitalDataContext context=new HospitalDataContext();
            var list1 = context.Patients.ToList();

          // dataGridView1.AutoGenerateColumns = false;
            //dataGridView1.DataSource = staffBLL.SelectAll();
            //dataGridView1.DataSource = list1;
           // gridControl1.DataSource = staffBLL.SelectAll();
        }

        private void xtraTabControl2_Click(object sender, EventArgs e)
        {

        }

        private void xtraTabControl1_CloseButtonClick(object sender, EventArgs e)
        {
            xtraTabControl1.TabPages.RemoveAt(xtraTabControl1.SelectedTabPageIndex);
            
        }

        private void xtraTabControl1_Click(object sender, EventArgs e)
        {

        }

        private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            xtraTabControl1.TabPages.Add(xtraTabPage6);
            
        }

        private void xtraTabControl1_ControlAdded(object sender, ControlEventArgs e)
        {
            xtraTabControl1.SelectedTabPageIndex = xtraTabControl1.TabPages.Count - 1;
        }

        private void ribbonControl1_Click(object sender, EventArgs e)
        {

        }

        private void xtraTabPage1_Paint(object sender, PaintEventArgs e)
        {

        }
    }
}
